package net.dodoman.bit;

public class Bit {

	private Bit() {

	}

	public static void main(String[] args) {

	}

	public static String getBitBinaryString(char operator) {
		int i = 2, j = -5;
		String s = null;
		switch (operator) {
		case 'i':
			s = Integer.toBinaryString(i);
			break;
		case 'j':
			s = Integer.toBinaryString(j);
			break;
		case '&':
			s = Integer.toBinaryString(i & j);
			break;
		case '|':
			s = Integer.toBinaryString(i | j);
			break;
		case '~':
			s = Integer.toBinaryString(~j);
			break;
		case '^':
			s = Integer.toBinaryString(i ^ j);
			break;
		case 'l':
			s = Integer.toBinaryString(i << 2);
			break;
		case 'r':
			s = Integer.toBinaryString(j >> 3);
			break;
		case 'y':
			s = Integer.toBinaryString(j >>> 3);
			break;
		}
		System.out.println(s);
		return s;
	}
}
